<#assign ctx = request.contextPath />
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <title>提现记录</title>
    <link href="${ctx}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${ctx}/assets/css/weixing.css" rel="stylesheet"/>
    <link href="${ctx}/assets/css/hook.css" rel="stylesheet"/>
  </head>
  <body>
  	<div class="hook" id="hook">
	</div>
  	<#if tixianrecords?? && (tixianrecords.totalElements>0)>
		<ul id="thelist">
	  		<#list tixianrecords.content as tixianrecord>
			  	<div class="list-group">
			  	  
			  	  <div class="list-group">
					  <div class="list-group-item active">
					    <p style="text-align:left; float: left; margin-bottom: 0px;">提现金额：</p>             
					    <p style="text-align: right; margin-bottom: 0px;">${tixianrecord.money?if_exists}元</p>
					  </div>
					  <div class="list-group-item">
				 	  	 <p style="text-align:left; float: left; margin-bottom: 0px;">提现后金额:</p>             
					  	 <p style="text-align: right; margin-bottom: 0px; ">${tixianrecord.afterMoney?if_exists}元</p>
					  </div>
					  <div class="list-group-item">
				 	  	 <p style="text-align:left; float: left; margin-bottom: 0px;">日期:</p>             
					  	 <p style="text-align: right; margin-bottom: 0px; ">${tixianrecord.createdStr?if_exists}</p>
					  </div> 
					  <div class="list-group-item">
				 	  	 <p style="text-align:left; float: left; margin-bottom: 0px;">备注:</p>             
					  	 <p style="text-align: right; margin-bottom: 0px; ">${tixianrecord.memo?if_exists}</p>
					  </div>  
				  </div> 
				</div>
			</#list>
		</ul>
		<#if (tixianrecords.totalElements>10)>
			<div style="text-align:center" id="loadmore">
				点击加载更多
			</div>
		<#else>
			<div style="text-align:center">
				没有更多数据
			</div>
		</#if>
  	<#else>
  		<div style="text-align:center">
			暂无提现记录
		</div>
	</#if>
  	
    <script src="${ctx}/assets/js/jquery-1.11.0.min.js"></script>
    <script src="${ctx}/assets/js/bootstrap.min.js"></script>
    <script src="${ctx}/assets/js/mousewheel.js"></script>
    <script src="${ctx}/assets/js/hook.js"></script>
    <script type="text/javascript">
	var myScroll,
	pullDownEl, pullDownOffset,
	pullUpEl, pullUpOffset,
	generatedCount = 0;
	var page = 0;

	function pullUpAction () {
		page=page+1;
		$.ajax({
             type: "GET",
             url: "${ctx}/wx/v1/ConsumerManager/tixianRecordsData",
             data: {'wxuser':'${wxuser}','page':page,'limit':10},	
             dataType: "json",
             success: function(data){ 
             	if(null!=data && data.numberOfElements>0){
             		var content="";
             		$.each(data.content, function (index,element) {  
             			content+='<div class="list-group">'+
									  '<div class="list-group-item active">'+
									    '<p style="text-align:left; float: left; margin-bottom: 0px;">订单号：</p>'+        
									    '<p style="text-align: right; margin-bottom: 0px;">'+element.orderNumber+'</p>'+
									  '</div>'+
									   '<div class="list-group-item">'+
								 	  	 '<p style="text-align:left; float: left; margin-bottom: 0px;">日期:</p>'+          
									  	 '<p style="text-align: right; margin-bottom: 0px; ">'+element.finishedTimeStr+'</p>'+
									  '</div>'+
									  '<div class="list-group-item">'+
								 	  	 '<p style="text-align:left; float: left; margin-bottom: 0px;">金额:</p>'+            
									  	 '<p style="text-align: right; margin-bottom: 0px; ">'+element.money+'元</p>'+
									  '</div>'+
									'</div>';
             		});
             		$("#thelist").append(content);
             	}
             	else{
             		$("#loadmore").html("没有更多数据");
             	}
             }
    	});
	}

	$(document).ready(function(){
		$('#hook').hook({
			reloadPage:false,
			reloadEl:function(){
				window.location.reload(true);
			}
		});
		
		$("#loadmore").click(function(){
			pullUpAction();
		});
	});

	</script>
  </body>
</html>